import * as ngCompiler from "@angular/compiler-cli";
import { pwd2 } from "alias-kit.js";
import { Project } from "ts-morph";
import * as ts from "typescript";

const options: ts.CompilerOptions = {
  basePath: "src",
  target: ts.ScriptTarget.ESNext,
  module: ts.ModuleKind.ESNext,
  emitDecoratorMetadata: true,
  experimentalDecorators: true,
};

const program = new ngCompiler.NgtscProgram(
  [pwd2("./app/ngx-app/app.component.ts"), pwd2("./app/ngx-app/app.module.ts")],
  options,
  ts.createCompilerHost({}),
);

program.emit();
